<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function storeData() {
            window.localStorage.setItem("name","tom");
        }
        function getData() {
            alert(window.localStorage.getItem("name"))
        }

        function removeData() {
            window.localStorage.removeItem("name");
        }
    </script>
</head>
<body>
    <h1>Web Storage演示</h1>
    <button onclick="storeData()">存储数据</button>
    <button onclick="getData()">获取数据</button>
    <button onclick="removeData()">删除数据</button>
</body>
</html>